﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="{$cfg_site_description}" />

<title>商家設置|{$cfg_site_name}</title>
{template 'header'}
<body>
<div id="buy917_wrap">
	<div id="buy917_login">
     <div class="logins">
	 {if !empty($_USERS)}
      <ul id="account">
        <li title="tlover" class="username">歡迎您，{$_USERS['uname']}！</li>
        <li class="account1">&nbsp;
		<a href="m.php?action=bond&type=available">我的團購券</a> | <a href="m.php?action=orders&type=all">我的訂單</a> | 
		<a href="m.php?action=account">帳戶餘額</a> | <a href="m.php?action=settings">帳戶設置 | </a>
		</li>
        <li class="logout"><a href="quit.php">退出</a></li>
      </ul>
      {else}
      <ul id="account">
        <li class="login"><a href="login.php">會員登入 | 註冊</a></li>       
      </ul>
      {/if}
      </div>   
	</div>   
    <div id="buy917_header">
    	<div id="buy917_logo"><a href="index.php">Buy917</a></div>
        <div class="buy917_header_banner">
        	<div class="buy917_header_topbanner">
            <?php include("admin/event.php")?>
            </div>
          	<div class="buy917_header_select">
            	<div class="buy917_header_city">
                	 {if !empty($_cityid)}
                    <div class="guides">
                        <div class="city">
                            <h2>{$_cityname}</h2>
                        </div>
                        <div id="guides-city-change" class="change">切換城市</div>
                        <div id="guides-city-list" class="city-list">
                            <ul>
                            {loop $_citylist $v}
                                <li {if $v['cid']==$_cityid}class="current"{/if}><a href="index.php?cityid={$v['cid']}">{$v['cityname']}</a></li>
                            {/loop}
                            </ul>                   
                        </div>
                    </div>
                    {/if}	
                </div>
                <div class="buy917_header_group">
                	<ul>
                    	<li class="group_left"></li>
                        <li><a href="#" class="fb">Facebook</a></li>
                        <li><a href="#" class="plk">plurk</a></li>
                        <li><a href="#" class="twi">twitter</a></li>
                        <li><a href="#" class="rss">rss</a></li>
                        <li class="group_right"></li>
                    </ul>
                </div>
            </div>
       </div>
    </div><!-- buy917_header -->
  
    <div id="buy917_menu">
    	<a href="index.php">馬上 揪一起</a>
        <a href="grouplist.php">曾經 揪一起</a>
        <a href="article.php?aid=3" <?php if($_GET['aid']== 3){ echo "class='on'";} ?>>怎樣 揪一起</a>
        <a href="article.php?aid=1" class="end <?php if($_GET['aid']== 1){ echo "on";} ?>">問答 揪一起</a>       
    </div><!-- buy917_menu -->
       
    <div id="buy917_middle">
        	<div class="buy917_grouplist_top"></div>      
            <div class="buy917_grouplist_body"> 
				<h2 class="abouth2">
					<ul>
						<li><a href="s.php?action=bond">店家管理</a></li>
						<li class="current"><a href="s.php?action=settings">店家設置</a></li>
					</ul>
				</h2>
				<div class="sect">
                    <form id="settings-form" method="post" action="{$theurl}">
					<input type="hidden" name="sid" value="{$_USERS['sid']}"/>
                        <div class="field">
                            <label for="settings-email-address">商家名稱</label>
                            <input type="text" size="30" name="name" id="settings-email-address" class="f-input readonly" readonly="readonly" value="{$_SUSERS['name']}" />
                        </div>
                        <div class="field username">
                            <label for="settings-username">商家網址</label>

                            <input type="text" size="30" name="web" id="settings-username" class="f-input" value="{$_SUSERS['web']}" />
                        </div>
                       
                        <div class="field password">
                            <label for="settings-password">商家地址</label>
                             <input type="text" size="30" name="address" id="settings-username" class="f-input" value="{$_SUSERS['address']}" />
                        </div>
                        <div class="field password">

                            <label for="settings-password-confirm">標記地圖</label>
                            <input name="map" type="text" id="map" value="{$_SUSERS['map']}" />
<input type="button" id="btn_addMarker" disabled value="標記位置" onclick="AddMarker()" class="formbutton" /> 	  
<div id="d_map" style="background-color:#FFF;border:solid 6px gray;width:581px;margin-top:3px;">
<div style="width:580px; height:300px;background-color:#f3f3f3;" id="map_canvas"></div></div>
{eval if(!empty($_SUSERS['map']))list($xx,$yy,$zz)=explode(',',$_SUSERS['map']);}

<input type="hidden" name="lat" id="lat" value="{$xx}" />
<input type="hidden" name="lng" id="lng" value="{$yy}" />
<input type="hidden" name="zoom" id="zoom" value="{$zz}" />
<script src="http://maps.google.com/maps?file=api&v=2&oe=gb2312&key={$cfg_googlemap_key}&hl=zh-tw" type="text/javascript"></script>
<script type="text/javascript">
var myMap;
var myMarker;
window.onload = function() {
if (GBrowserIsCompatible()) {
myMap = new GMap2(document.getElementById("map_canvas"));
var center = new GLatLng(25.047795,121.516900); //这个地方就是调整默认显示哪里的，里面的经纬度,请在表格最下面查询，输入你所在的县市如果没有县级，请查询地级市，后面的前面2个数值串，就是经度和纬度，注意中间用，号隔开
myMap.addControl(new GLargeMapControl());
myMap.addControl(new GScaleControl());
myMap.enableScrollWheelZoom();
if (document.getElementById("lat").value == ""){
myMap.setCenter(center, 10);     //这个地方就是可以修改到显示多少级别的，如果想显示到街道级别，把10改为16就差不多了，可以自己//改改看
document.getElementById("btn_addMarker").disabled = false;
}
else{
var _lat = document.getElementById("lat").value;
var _lng = document.getElementById("lng").value;
var _zoom = document.getElementById("zoom").value;
var _center = new GLatLng(_lat,_lng);
myMap.setCenter(_center,parseInt(_zoom));
document.getElementById("btn_addMarker").disabled = true;
Mark(_lat,_lng);
}
}
}
function Mark(lat,lng){
myMarker = new GMarker(new GLatLng(lat,lng), {draggable: true});
GEvent.addListener(myMarker, "click", function() { 
myMarker.openInfoWindowHtml("<b>把气球拖动到你要标记的地方</b><p>拖动左边的比例尺可以缩放地图</p><a href='javascript:void(0);' onclick='DeleteMarker()'>删除标记</a>");
});
GEvent.addListener(myMarker, "dragstart", function() { 
myMarker.closeInfoWindow();
});
GEvent.addListener(myMarker, "dragend", function() {
var gll = myMarker.getLatLng();
document.getElementById("lat").value = gll.lat();
document.getElementById("lng").value = gll.lng();
document.getElementById("zoom").value = myMap.getZoom();
var mapstr="";
mapstr=gll.lat()+','+gll.lng()+','+myMap.getZoom();
document.getElementById("map").value=mapstr;
myMarker.openInfoWindowHtml("<b>把气球拖动到你要标记的地方</b><p>拖动左边的比例尺可以缩放地图</p><a href='javascript:void(0);' onclick='DeleteMarker()'>删除标记</a>");
});
myMap.addOverlay(myMarker);
myMarker.openInfoWindowHtml("<b>把气球拖动到你要标记的地方</b><p>拖动左边的比例尺可以缩放地图</p><a href='javascript:void(0);' onclick='DeleteMarker()'>删除标记</a>");
}
function AddMarker(){
document.getElementById("btn_addMarker").disabled = true;
var ll = myMap.getCenter();
document.getElementById("lat").value = ll.lat();
document.getElementById("lng").value = ll.lng();
document.getElementById("zoom").value = myMap.getZoom();
Mark(ll.lat(),ll.lng());
}
function DeleteMarker(){
document.getElementById("btn_addMarker").disabled = false;
myMap.removeOverlay(myMarker);
var gll = myMarker.getLatLng();
document.getElementById("lat").value = "";
document.getElementById("lng").value = "";
document.getElementById("zoom").value = "";
}
</script>                        </div>
                        <div class="field mobile">
                            <label for="settings-mobile">聯絡電話</label>
                            <input type="text" size="30" name="tel" id="settings-mobile" class="f-input" value="{$_SUSERS['tel']}" />
                         
                        </div>
	                     <div class="field mobile">
                            <label for="settings-mobile">營業時間</label>
                            <input type="text" size="30" name="operating_time" id="settings-mobile" class="f-input" value="{$_SUSERS['operating_time']}" />
                         
                        </div>
						
	                     <div class="field mobile">
                            <label for="settings-mobile">條碼類型</label>
							
							
	<SELECT style="WIDTH: 300px" onchange="" size=1 name="codebar">
	 <OPTION value=BCGcodabar {if $_USERS['codebar']=='BCGcodabar'} selected='selected'{/if}>Codabar</OPTION>
	 <OPTION value=BCGcode11 {if $_USERS['codebar']=='BCGcode11'} selected='selected'{/if}>Code 11</OPTION> 
	 <OPTION value=BCGcode39 {if $_USERS['codebar']=='BCGcode39'} selected='selected'{/if}>Code 39</OPTION> 
	 <OPTION value=BCGcode39extended {if $_USERS['codebar']=='BCGcode39extended'} selected='selected'{/if}>Code 39 Extended</OPTION> 
	 <OPTION value=BCGcode93 {if $_USERS['codebar']=='BCGcode93'} selected='selected'{/if}>Code 93</OPTION>
	 <OPTION value=BCGcode128 {if $_USERS['codebar']=='BCGcode128'} selected='selected'{/if}>Code 128</OPTION>
	 <OPTION value=BCGean8 {if $_USERS['codebar']=='BCGean8'} selected='selected'{/if}>EAN-8</OPTION> 
	 <OPTION value=BCGean13 {if $_USERS['codebar']=='BCGean13'} selected='selected'{/if}>EAN-13</OPTION> 
	 <OPTION value=BCGisbn {if $_USERS['codebar']=='BCGisbn'} selected='selected'{/if}>ISBN-10 / ISBN-13</OPTION> 
	 <OPTION value=BCGi25 {if $_USERS['codebar']=='BCGi25'} selected='selected'{/if}>Interleaved 2 of 5</OPTION> 
	 <OPTION value=BCGs25 {if $_USERS['codebar']=='BCGs25'} selected='selected'{/if}>Standard 2 of 5</OPTION> 
	 <OPTION value=BCGmsi {if $_USERS['codebar']=='BCGmsi'} selected='selected'{/if}>MSI Plessey</OPTION> 
	 <OPTION value=BCGupca {if $_USERS['codebar']=='BCGupca'} selected='selected'{/if}>UPC-A</OPTION> 
	 <OPTION value=BCGupce {if $_USERS['codebar']=='BCGupce'} selected='selected'{/if}>UPC-E</OPTION> 
	 <OPTION value=BCGupcext2 {if $_USERS['codebar']=='BCGupcext2'} selected='selected'{/if}>UPC Extension 2 Digits</OPTION> 
	 <OPTION value=BCGupcext5 {if $_USERS['codebar']=='BCGupcext5'} selected='selected'{/if}>UPC Extension 5 Digits</OPTION> 
	 <OPTION value=BCGpostnet {if $_USERS['codebar']=='BCGpostnet'} selected='selected'{/if}>PostNet</OPTION> 
	 <OPTION value=BCGothercode {if $_USERS['codebar']=='BCGothercode'} selected='selected'{/if}>Other Barcode</OPTION>
 </SELECT>
                        </div>
						
				 <div class="field mobile">
                            <label for="settings-mobile">條形碼大小</label>
     <SELECT style="WIDTH: 300px" onchange="" size=1 name=resolution> 
	<OPTION value=1 {if $_USERS['resolution']==1}selected='selected'{/if}>1號</OPTION> 
	<OPTION value=2 {if $_USERS['resolution']==2}selected='selected'{/if}>2號</OPTION> 
	<OPTION value=3 {if $_USERS['resolution']==3}selected='selected'{/if}>3號</OPTION>
      </SELECT>	
                        </div>		
						 <div class="field mobile">
                            <label for="settings-mobile">公交線路</label>
							<textarea name="bus" cols="50" rows="4" id="bus">{$_SUSERS['bus']}</textarea>
                         
                         
                        </div>
						<div class="field mobile">
                            <label for="settings-mobile">密碼修改</label>
                            <input type="text" size="30" name="pwd" id="settings-pwd" class="f-input" value="{$_SUSERS['pwd']}" />
                         
                        </div>
                        <div class="clear"></div>
                        <div class="act">
                        	
                            <input type="submit" value="更改" name="commit" id="settings-submit" class="formbutton"/>
                        </div>
                    </form>
                </div>
            </div><!-- buy917_grouplist_body -->
            <div class="buy917_grouplist_bottom"></div>
    </div><!-- buy917_middle -->
</div><!-- buy917wrap -->
<!-- footer -->
<div id="buy917_footer">
	{template 'footer'}	
</div>
</body>
</html>
